package com.sinosoft.vaccinetoai.utils.h3cai.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Transient;

/**
 * 用户Token
 * @author xzh
 * @date 2023-10-15 16:18
 * @since 1.0.3
 */
@Getter
@Setter
@ToString
public class H3cAlApiUserToken {

    // Redis缓存存储Key前缀
    @Transient
    public transient static final String REDIS_CACHE_KEY_PREFIX = "H3cAlApi_API_USER_TOKEN_CACHE__";

    // Redis缓存刷新Key前缀
    @Transient
    public transient static final String REDIS_REFRESH_KEY_PREFIX = "H3cAlApi_API_USER_TOKEN_REFRESH__";

    // Redis缓存版本Key前缀
    @Transient
    public transient static final String REDIS_VERSION_KEY_PREFIX = "H3cAlApi_API_USER_TOKEN_VERSION__";

    // 用户Token
    private String accessToken;

    // 过期时间（时间戳；毫秒）
    private Long expiresIn;

    // 版本
    private Long version;

}
